/*
package com.bite.book.config;

import com.bite.book.model.Result;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.apache.ibatis.jdbc.Null;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
@ResponseBody
@ControllerAdvice
public class ErrorAdvice {
    @ExceptionHandler
    public Object handler(Exception e){
        return Result.fail(e.getMessage());
    }
    @ExceptionHandler
    public Object handler1(NullPointerException e){
        return Result.fail("NullPointerException: " + e.getMessage());
    }
    @ExceptionHandler
    public Object handler2(ArithmeticException e){
        return Result.fail("ArithmeticException:" + e.getMessage());
    }
}
*/
